package com.olah.project.dao;

import com.olah.common.entity.po.project.Project;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ProjectDao {

    List<Project> queryAll();

    Project queryById(@Param("id") int id);

    void publish(@Param("project") Project project);

    @Insert("INSERT INTO project_position(pt_project_id, pt_tag_id) VALUES (#{project}, #{tag});")
    void insertProjectMember(Map<String, Object> map);

    @Select("SELECT * FROM position")
    List<String> getPositions();

}
